Skip to content

Register nextafter() on 8.4.0-dev forward profile (#15584) - #15591

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-15584-nextafter-forward-profile
Jul 3, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-15584-nextafter-forward-profile

Conversation

@PurHur

@PurHur PurHur commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change CompilerVersion::supportsNextafter() to advertisesBuiltinSince('8.4.0') so function_exists('nextafter') is true on the 8.4.0-dev forward profile (php-src 8.4 math.c).
  • Fix VmMath::nextafter() delegating to the VM-registered builtin (incorrect float + recursion risk).
  • Fix InternalStrictArg::requireFloat() JITVariable → Variable typo blocking JIT/AOT lowering.
  • Align VmVarExportFloat with Zend var_export for IEEE edge floats (e.g. nextafter(1.0, 0.0)).

Closes #15584

Verification

./script/docker-exec.sh -- bash -lc '
  php bin/vm.php test/repro/maintainer_gap_nextafter_forward_profile.php
  ./vendor/bin/phpunit --filter nextafter
  ./vendor/bin/phpunit test/unit/CompilerVersionGateTest.php test/unit/CompilerVersionBuiltinAdvertisementTest.php
  php bin/compile.php -l test/repro/maintainer_gap_nextafter_forward_profile.php
'

Output:

ok
OK (12 tests, 18 assertions)   # nextafter VM/JIT compliance + unit
OK (59 tests, 75 assertions)   # version gate tests
# AOT lint: exit 0

Note: full AotTest::nextafter_basic link/run still hits harness LLVM segfault (same as wordwrap_width_coerce on this host); VM + JIT + compile-only probe are green.

Made with Cursor

Gate with advertisesBuiltinSince('8.4.0') like str_increment; stop VmMath
from delegating to the VM-registered builtin (wrong recursion); fix
InternalStrictArg JITVariable typo blocking AOT lowering; align var_export
float formatting with Zend for IEEE edge values.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 709509f into master Jul 3, 2026
@PurHur
PurHur deleted the agent/issue-15584-nextafter-forward-profile branch July 3, 2026 17:15
PurHur added a commit that referenced this pull request Jul 3, 2026
…) (#15648)

Sync docs/capabilities.md and capability-comparison.html with builtin
advertisement changes from #15577 (sodium AES-GCM/Ed25519/secretstream)
and #15591 (nextafter on 8.4.0-dev forward profile).

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: nextafter() withheld on 8.4.0-dev profile — impl present, function_exists false (ext/standard/math.c)

1 participant